<?php
/**
 * Created by PhpStorm.
 * User: poptser@foxmail.com
 * Date: 2018/1/30
 * Time: 19:47
 */

//仓管路由器
use Illuminate\Http\Request;

//Route::post('/caigou', 'test@index');

Route::group([
    'namespace' =>  'WarehouseManage',
], function () {
    Route::post('/caigou', 'CaigouController@ReceivingDetails');

    /* ectouch 后台商品（物料）同步相关 */
    Route::post('/updateGoodsInfo', 'GoodsController@getGoodsInfo');
    Route::post('/getGoodsNew', 'GoodsController@getGoodsNew');        //更新新品
    Route::post('/updateGoods', 'GoodsController@getUpdateGoods');      //更新指定修改商品
    Route::get('/updateAll', 'GoodsController@getGoodsUpdateAll');     //更新所有修改

    
    //获取金蝶仓库列表
    Route::get('/getwarehouselist', 'WarehouseController@GetWarehouseList');
    //根据仓库编号或者仓库ID获取对应仓库信息
    Route::post('/getwarehouseinfo', 'WarehouseController@GetWarehouseInfo');
    //获取部门列表
    Route::get('/getdepartmentlist', 'DepartmentController@GetDepartmentList');
    //获取岗位信息列表
    Route::get('/getjobslist', 'JobsController@GetJobsList');
    //获取岗位信息明细
    Route::post('/getjobsinfo', 'JobsController@GetJobsInfo');
    Route::get('/thesalesmantypelist', 'TheSalesmanController@GetTheSalesmanTypeList');
    Route::post('/getemployeesinfo', 'EmployeesController@GetEmployeesInfo');
    Route::post('/saveemployees', 'EmployeesController@SaveEmployees');
    Route::post('/editemployees', 'EmployeesController@EditEmployees');
    Route::post('/getemployeepostinfo', 'EmployeePostController@GetEmployeePostInfo');
    Route::post('/saveemployeepost', 'EmployeePostController@SaveEmployeePost');
    Route::post('/getthesalesmaninfo', 'TheSalesmanController@GetTheSalesmanInfo');
    //根据WID获取当前仓库基本信息
    Route::post('/getwarehouselocalinfo', 'WarehouseLocalController@GetWarehouseInfo');
    //查看当前商品的库存情况
    Route::post('/getgoodsinventory', 'WarehouseLocalController@GetGoodsInventory');
    //检查金蝶系统商品物料可用量是否充足
    Route::post('/checkgoodsinventoryavbqty', 'WarehouseLocalController@CheckGoodsInventoryAVBQty');
    Route::get('/submitorder', 'JobsController@SubmitOrder');
    Route::post('/jobstest', 'JobsController@test');
    //根据商品货号和对应所属仓库编号查询商品库存明细
    Route::post('/getgoodswarehouse', 'WarehouseLocalController@GetGoodsWarehouse');
    //提交占用订单商品库存请求
    Route::post('/submitordergoodsinventoryrequest', 'OrderGoodsInventoryCarryingDetailController@SubmitOrderGoodsInventoryRequest');
    //未付款自动取消订单
    Route::post('/autoordercancel', 'OrderGoodsInventoryCarryingDetailController@AutoOrderCancel');
    //问题处理(缺货退货、次品退货、退货退款)
    Route::post('/updateconsignmentnote', 'ConsignmentNoteController@UpdateConsignmentNote');
    //更改发货通知单为已审核状态
    Route::post('/submitconsignmentnote', 'ConsignmentNoteController@SubmitConsignmentNote');
    //发货通知单下推销售出库单
    Route::post('/consignmentnotepushsalesrelease', 'ConsignmentNoteController@ConsignmentNotePushSalesRelease');
    //出仓后，客服操作退款（退货退款、漏送退款）
    Route::post('/salesrefunds', 'SalesReturnsController@SalesRefunds');
    //根据商品货号和对应所属仓库ID查询商品可用库存
    Route::post('/checkgoodsusablewarehouse', 'WarehouseLocalController@CheckGoodsUsableWarehouse');
    //用户手动取消订单
    Route::post('/usershandordercancel', 'OrderGoodsInventoryCarryingDetailController@UsersHandOrderCancel');
    //创建发货通知单并且提交审核并且下推为销售出库单
    Route::post('/consignmentnotesubmitandpushsalesrelease', 'ConsignmentNoteController@ConsignmentNoteSubmitAndPushSalesRelease');
    //退货仓直接调拨根据类型调拨指定仓库并提交审核
    Route::post('/ordergoodsbacktoWarehouse', 'DirectTransfersController@OrderGoodsBackToWarehouse');
    //主仓操作次品录入直接调拨到次品仓
    Route::post('/defectivegoodsentry', 'DirectTransfersController@DefectiveGoodsEntry');
    //创建盘点方案
    Route::post('/createstockcountscheme', 'StockCountSchemeController@CreateStockCountScheme');
    //盘点方案提交并审核并查看对应物料盘点作业单明细
    Route::post('/submitandauditstockcountschemeandio', 'StockCountSchemeController@SubmitAndAuditStockCountSchemeAndIO');
    //审核盘点方案
    Route::post('/auditstockcountscheme', 'StockCountSchemeController@AuditStockCountScheme');
    //更新物料盘点作业对应物料实物盘点数量并且提交审核
    Route::post('/updateinventoryoperationandsubmitandaudit', 'InventoryOperationController@UpdateInventoryOperationAndSubmitAndAudit');
    //发货通知单操作反审核以及作废单据
    Route::post('/unauditandcancelconsignmentnote', 'ConsignmentNoteController@UnAuditAndCancelConsignmentNote');


    /* App 端次品录入 */
    Route::post('/getGoodsInfo', 'CipinController@getGoodsInfo');   //获取商品详情
    Route::post('/setGoodsPoor', 'CipinController@setGoodsPoor');   //设置商品次品

    /* App 端盘点库存 */
    Route::post('/getGoodsInfoPD', 'PandianController@getGoodsInfo');   //获取商品详情
    Route::post('/setGoodsNumPD', 'PandianController@setGoodsNum');   //设置商品盘点
});